﻿<%@ Page Title="Formate Date" Language="C#" MasterPageFile="~/Demo.master" Inherits="DemoPage"
    StylesheetTheme="vader" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>

<script runat="server">
    protected void OnDatePickerFormatChanged(object sender, EventArgs e)
    {
        SampleDatePicker.DateFormatString = formatDropDown.SelectedValue;
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Choose a date format from the dropdown, then click on the input and select a date
        to see it in that format. Using the <b>DateFormatString</b> property to customize
        the display format.
    </div>
    <DotNetAge:DatePicker ID="SampleDatePicker" runat="server" DisplayMode="Picker" ShowButtonImageOnly="True"
        ShowDefaultButtonImage="True" ShowIconMode="Both" AnimationOnShow="slideDown"
        ButtonText="..." Width="200px">
    </DotNetAge:DatePicker>
    <br />
    <br />
    <br />
    Select the date format below<br />
    <asp:DropDownList ID="formatDropDown" runat="server" Width="200" OnSelectedIndexChanged="OnDatePickerFormatChanged"
        AutoPostBack="true">
        <asp:ListItem Value="MM/dd/yyyy" Text="Default - MM/dd/yyyy" Selected="True"></asp:ListItem>
        <asp:ListItem Value="yyyy-MM-dd" Text="ISO 8601 - yyyy-MM-dd"></asp:ListItem>
        <asp:ListItem Value="d MMM, yyyy" Text="Short Date String Format- d MMM, yyyy"></asp:ListItem>
        <asp:ListItem Value="d MMMM, yyyy" Text="Medium - d MMMM, yyyy"></asp:ListItem>
        <asp:ListItem Value="dddd, d MMMM, yyyy" Text="LongDateString Format - dddd, d MMMM, yyyy"></asp:ListItem>
    </asp:DropDownList>
    <br />
    <br />
    <br />
    <demo:Code ID="subCodes" runat="server" SourceFile="~/DatePicker/Codes/FormatDate.aspx">
    </demo:Code>
</asp:Content>
